﻿using ERP.ERPSystem.RBAC.Dto;
using ERP.Team.RBAC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace ERP.ERPSystem.RBAC
{
    public interface IUserService:IApplicationService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        Task<LoginResultDto> LoginAsync(string userName, string password);
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="userdto"></param>
        /// <returns></returns>
        Task<int> AddUser(UserDto userdto);
        /// <summary>
        /// 查询用户
        /// </summary>
        /// <returns></returns>
        Task<List<UserDto>> ShowUser();
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteUser(int id);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="userdto"></param>
        /// <returns></returns>
        Task<int> UpdateUser(UserDto userdto);
        /// <summary>
        /// 用户分配角色
        /// </summary>
        /// <param name="iputUserRoleDto"></param>
        /// <returns></returns>
        Task<int> AddUserRole(IputUserRoleDto iputUserRoleDto);
        /// <summary>
        /// 获取角色编号
        /// </summary>
        /// <param name="uid">选择的用户</param>
        /// <returns>返回角色编号集合</returns>
        Task<List<int>> GetUserRole(int uid);
    }
}
